package gui;

import java.awt.Component;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import net.miginfocom.swing.MigLayout;

public class SingleField extends JPanel {
    
    public JLabel label;
    public JTextField field;
    
    public SingleField(String labelText) {
        setLayout(new MigLayout());
        label = new JLabel(labelText);
        field = new JTextField();
        field.setColumns(20);
        add(label, "");
        add(field, "wrap");
    }
    
    public SingleField(final String labelText, final int lengthField) {
        setLayout(new MigLayout());
        label = new JLabel(labelText);
        field = new JTextField();
        field.setColumns(lengthField);
        add(label, "");
        add(field, "wrap");
    }

    
}
